package com.woniu113.junk.site.client;

import com.woniu113.junk.commons.model.Result;
import com.woniu113.junk.site.client.dto.AdminInfo;
import com.woniu113.junk.site.client.dto.AdminRole;
import com.woniu113.junk.site.client.dto.EditStationIdForm;
import com.woniu113.junk.site.client.dto.UserInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "junk-user",path = "/user")
public interface UserClient {

    /**
     * 根据adminId查询admin信息
     * @param adminId 管理员id
     * @return admin信息
     */
    @GetMapping("/adminInfo/selectAdminById")
    public Result<AdminInfo> selectAdminById(@RequestParam("adminId") Integer adminId);

    @GetMapping("/adminInfo/selectAdminById2")
    public Result<AdminInfo> selectAdminById2(@RequestParam("adminId") Integer adminId);

    @PostMapping("/adminInfo/editStationId")
    public Result editStationId(@RequestBody EditStationIdForm form);

    @GetMapping("/userInfo/selectIntegral")
    public Result<UserInfo> selectIntegral(@RequestParam("userId") Integer userId);

    /**
     * 根据id查询角色
     */
    @GetMapping("/adminRole/selectRoleById")
    public Result<AdminRole> selectRoleById(@RequestParam("id") Integer id);
}
